package com.xx.jicheng.entity;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonProperty;

@SuppressWarnings("serial")
public class City implements Serializable {

	private int id;
	@JsonProperty("text")
	private String name;
	private Integer pid;
	private String sname;
	private int lvl;
	private String ccode;
	private String zcode;
	private String mname;
	private String lng; /* 经度 */
	private String lat; /* 纬度 */
	private String pinyin;

	public City() {
		super();
	}
	
	public String getState(){
		return (id % 100 == 0)?"closed":"open";
	}

	public City(int id, String name, Integer pid, String sname, int lvl, String ccode, String zcode, String mname,
			String lng, String lat, String pinyin) {
		super();
		this.id = id;
		this.name = name;
		this.pid = pid;
		this.sname = sname;
		this.lvl = lvl;
		this.ccode = ccode;
		this.zcode = zcode;
		this.mname = mname;
		this.lng = lng;
		this.lat = lat;
		this.pinyin = pinyin;
	}

	public String getSname() {
		return sname;
	}

	public void setSname(String sname) {
		this.sname = sname;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public int getLvl() {
		return lvl;
	}

	public void setLvl(int lvl) {
		this.lvl = lvl;
	}

	public String getCcode() {
		return ccode;
	}

	public void setCcode(String ccode) {
		this.ccode = ccode;
	}

	public String getZcode() {
		return zcode;
	}

	public void setZcode(String zcode) {
		this.zcode = zcode;
	}

	public String getMname() {
		return mname;
	}

	public void setMname(String mname) {
		this.mname = mname;
	}

	public String getLng() {
		return lng;
	}

	public void setLng(String lng) {
		this.lng = lng;
	}

	public String getLat() {
		return lat;
	}

	public void setLat(String lat) {
		this.lat = lat;
	}

	public String getPinyin() {
		return pinyin;
	}

	public void setPinyin(String pinyin) {
		this.pinyin = pinyin;
	}

}
